package com.cn.zengzeng.spbzengzeng.test;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

import java.time.Duration;
import java.time.LocalDateTime;

/**
 * @Author: free
 * @Date: 2023/4/24 21:16
 */
public class WindowDemo extends Application {

    @Override
    public void start (Stage stage) throws Exception {
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime of = LocalDateTime.of(2023,3,8,18,30);
        Duration between = Duration.between(now,of);
        Label l = new Label("Hello, 你已经失业： " + Math.abs(between.toDays()) + "天,  共" + Math.abs(between.toHours()) + "小时.");
        Scene scene = new Scene(new StackPane(l), 640, 480);
        stage.setScene(scene);
        stage.show();
    }
    public static void main(String[] args) {
        launch();
    }
}
